<?php
//echo '<pre>';
//var_dump($_POST);
//echo '</pre>';

//echo $validate;
?>
<form class="form-horizontal" action="/<?php echo $content->path; ?>comment/check" method="POST">
      <fieldset>
        <legend>Додати відгук:</legend>
            <div class="no-margin">
                <div class="alert alert-block">
                    <h4 class="alert-heading">Важливо.</h4>
                    <p><i class="input-important">*</i>-поле обов'язкове для заповнення.</p>
                </div>
                <?php
                    if(count($validate) > 0)
                    {
                        echo '<div class="alert alert-error">
                            <h4 class="alert-heading">Помилка.</h4>';
                        foreach ($validate as $value)
                        {
                            echo '<li>'.$value.'</li>';
                        }
                        echo'</div>';
                    }
                ?>
            </div>
        <div class="control-group">
          <label class="control-label">Ім"я<i class="input-important">*</i>:</label>
          <div class="controls">
            <input type="text" class="span2" name="0" value="<?php echo $firstname; ?>">
          </div>
        </div>
        <div class="control-group">
          <label class="control-label">Прізвище:</label>
          <div class="controls">
            <input type="text" class="span2" name="1" value="<?php echo $surename; ?>">
          </div>
        </div>
        <div class="control-group">
          <label class="control-label">Посада:</label>
          <div class="controls">
            <input type="text" class="span2" name="4" value="<?php echo $title; ?>">
          </div>
        </div>
        <div class="control-group">
          <label class="control-label">Тема<i class="input-important">*</i>:</label>
          <div class="controls">
            <input type="text" class="span2" name="2" value="<?php echo $title; ?>">
          </div>
        </div>
        <div class="control-group">
            <textarea id="content" class="span2" rows="3" name="3"><?php echo $body; ?></textarea>
        </div>
        <div class="form-actions">
          <button class="btn btn-primary" type="submit">Додати</button>
          <button class="btn" type="reset">Очистити</button>
        </div>
      </fieldset>
    </form>
<script type="text/javascript">
    //<![CDATA[

            CKEDITOR.replace( 'content',
                    {
                            fullPage : true,
                            toolbar : 'Basic'
                    });
  

    //]]>
</script>
